#include"ProcessBar.h"
char lable[]="/-\\";
void processbar(int speed)
{
    char bar[NUM];
    memset(bar,'\0',sizeof(bar));
    int tem=0;
    int length=strlen(lable);
    while(tem<=TOP)
    {
        printf("[%-100s]%c[%d]\r",bar,lable[tem%length],tem);
        fflush(stdout);
        bar[tem++]=BODY;
        if(tem<100)
            bar[tem]=RIGHT;
        usleep(speed);
    }
    printf("\n");
}
